#ifndef STATIC_FILE_H
#define STATIC_FILE_H 1

#include <string.h>

#include "reader.h"

typedef struct __ncattr__ file_ext {
  const char *ext;
  const char *mime;
  dirlist_elem_t *delem;
} file_ext_t;
typedef struct array file_ext_array_t;

extern char static_files_dir[MAXPATHLEN+1];

file_ext_t *
add_file(const char *ext, const char *mtype, dirlist_elem_t *delem);

file_ext_t *
get_file(const char *url);

bool
init_static_files(char *dir_path, const char *extensions[], const char *mimes[]);

void
free_static_files(void);

#endif
